namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_Classes 主键列：Classes_ID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_Classes : Entity {
            
            protected String _Classes_ID;
            
            protected String _Classes_Name;
            
            protected String _Classes_ParentID;
            
            protected String _Classes_IsView;
            
            protected String _Classes_IsDetail;
            
            protected String _Classes_Image;
            
            protected Int32? _Classes_Order;
            
            protected Int32? _Classes_LayerIndex;
            
            protected String _Classes_IsDel;
            
            protected String _Classes_CreateUserID;
            
            protected String _Classes_CreateDate;
            
            protected String _Classes_CreateIP;
            
            public String Classes_ID {
                get {
                    return this._Classes_ID;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_ID, _Classes_ID, value);
                    this._Classes_ID = value;
                }
            }
            
            public String Classes_Name {
                get {
                    return this._Classes_Name;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_Name, _Classes_Name, value);
                    this._Classes_Name = value;
                }
            }
            
            /// <summary>
            /// 为0表示为第一级，即没有上级
            /// </summary>
            public String Classes_ParentID {
                get {
                    return this._Classes_ParentID;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_ParentID, _Classes_ParentID, value);
                    this._Classes_ParentID = value;
                }
            }
            
            /// <summary>
            /// 0不可见  1是可见
            /// </summary>
            public String Classes_IsView {
                get {
                    return this._Classes_IsView;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_IsView, _Classes_IsView, value);
                    this._Classes_IsView = value;
                }
            }
            
            /// <summary>
            /// 1非明细，0明细
            /// </summary>
            public String Classes_IsDetail {
                get {
                    return this._Classes_IsDetail;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_IsDetail, _Classes_IsDetail, value);
                    this._Classes_IsDetail = value;
                }
            }
            
            public String Classes_Image {
                get {
                    return this._Classes_Image;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_Image, _Classes_Image, value);
                    this._Classes_Image = value;
                }
            }
            
            public Int32? Classes_Order {
                get {
                    return this._Classes_Order;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_Order, _Classes_Order, value);
                    this._Classes_Order = value;
                }
            }
            
            /// <summary>
            /// 节点所在级次
            /// </summary>
            public Int32? Classes_LayerIndex {
                get {
                    return this._Classes_LayerIndex;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_LayerIndex, _Classes_LayerIndex, value);
                    this._Classes_LayerIndex = value;
                }
            }
            
            /// <summary>
            /// 0不删除，1删除
            /// </summary>
            public String Classes_IsDel {
                get {
                    return this._Classes_IsDel;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_IsDel, _Classes_IsDel, value);
                    this._Classes_IsDel = value;
                }
            }
            
            public String Classes_CreateUserID {
                get {
                    return this._Classes_CreateUserID;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_CreateUserID, _Classes_CreateUserID, value);
                    this._Classes_CreateUserID = value;
                }
            }
            
            public String Classes_CreateDate {
                get {
                    return this._Classes_CreateDate;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_CreateDate, _Classes_CreateDate, value);
                    this._Classes_CreateDate = value;
                }
            }
            
            public String Classes_CreateIP {
                get {
                    return this._Classes_CreateIP;
                }
                set {
                    this.OnPropertyValueChange(_.Classes_CreateIP, _Classes_CreateIP, value);
                    this._Classes_CreateIP = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_Classes>("T_Classes");
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.Classes_ID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.Classes_ID,
                        _.Classes_Name,
                        _.Classes_ParentID,
                        _.Classes_IsView,
                        _.Classes_IsDetail,
                        _.Classes_Image,
                        _.Classes_Order,
                        _.Classes_LayerIndex,
                        _.Classes_IsDel,
                        _.Classes_CreateUserID,
                        _.Classes_CreateDate,
                        _.Classes_CreateIP};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._Classes_ID,
                        this._Classes_Name,
                        this._Classes_ParentID,
                        this._Classes_IsView,
                        this._Classes_IsDetail,
                        this._Classes_Image,
                        this._Classes_Order,
                        this._Classes_LayerIndex,
                        this._Classes_IsDel,
                        this._Classes_CreateUserID,
                        this._Classes_CreateDate,
                        this._Classes_CreateIP};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.Classes_ID))) {
                    this._Classes_ID = reader.GetString(_.Classes_ID);
                }
                if ((false == reader.IsDBNull(_.Classes_Name))) {
                    this._Classes_Name = reader.GetString(_.Classes_Name);
                }
                if ((false == reader.IsDBNull(_.Classes_ParentID))) {
                    this._Classes_ParentID = reader.GetString(_.Classes_ParentID);
                }
                if ((false == reader.IsDBNull(_.Classes_IsView))) {
                    this._Classes_IsView = reader.GetString(_.Classes_IsView);
                }
                if ((false == reader.IsDBNull(_.Classes_IsDetail))) {
                    this._Classes_IsDetail = reader.GetString(_.Classes_IsDetail);
                }
                if ((false == reader.IsDBNull(_.Classes_Image))) {
                    this._Classes_Image = reader.GetString(_.Classes_Image);
                }
                if ((false == reader.IsDBNull(_.Classes_Order))) {
                    this._Classes_Order = reader.GetInt32(_.Classes_Order);
                }
                if ((false == reader.IsDBNull(_.Classes_LayerIndex))) {
                    this._Classes_LayerIndex = reader.GetInt32(_.Classes_LayerIndex);
                }
                if ((false == reader.IsDBNull(_.Classes_IsDel))) {
                    this._Classes_IsDel = reader.GetString(_.Classes_IsDel);
                }
                if ((false == reader.IsDBNull(_.Classes_CreateUserID))) {
                    this._Classes_CreateUserID = reader.GetString(_.Classes_CreateUserID);
                }
                if ((false == reader.IsDBNull(_.Classes_CreateDate))) {
                    this._Classes_CreateDate = reader.GetString(_.Classes_CreateDate);
                }
                if ((false == reader.IsDBNull(_.Classes_CreateIP))) {
                    this._Classes_CreateIP = reader.GetString(_.Classes_CreateIP);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_Classes).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_Classes>();
                
                /// <summary>
                /// 字段名：Classes_ID - 数据类型：String
                /// </summary>
                public static Field Classes_ID = new Field<T_Classes>("Classes_ID");
                
                /// <summary>
                /// 字段名：Classes_Name - 数据类型：String
                /// </summary>
                public static Field Classes_Name = new Field<T_Classes>("Classes_Name");
                
                /// <summary>
                /// 为0表示为第一级，即没有上级 - 字段名：Classes_ParentID - 数据类型：String
                /// </summary>
                public static Field Classes_ParentID = new Field<T_Classes>("Classes_ParentID");
                
                /// <summary>
                /// 0不可见  1是可见 - 字段名：Classes_IsView - 数据类型：String
                /// </summary>
                public static Field Classes_IsView = new Field<T_Classes>("Classes_IsView");
                
                /// <summary>
                /// 1非明细，0明细 - 字段名：Classes_IsDetail - 数据类型：String
                /// </summary>
                public static Field Classes_IsDetail = new Field<T_Classes>("Classes_IsDetail");
                
                /// <summary>
                /// 字段名：Classes_Image - 数据类型：String
                /// </summary>
                public static Field Classes_Image = new Field<T_Classes>("Classes_Image");
                
                /// <summary>
                /// 字段名：Classes_Order - 数据类型：Nullable`1
                /// </summary>
                public static Field Classes_Order = new Field<T_Classes>("Classes_Order");
                
                /// <summary>
                /// 节点所在级次 - 字段名：Classes_LayerIndex - 数据类型：Nullable`1
                /// </summary>
                public static Field Classes_LayerIndex = new Field<T_Classes>("Classes_LayerIndex");
                
                /// <summary>
                /// 0不删除，1删除 - 字段名：Classes_IsDel - 数据类型：String
                /// </summary>
                public static Field Classes_IsDel = new Field<T_Classes>("Classes_IsDel");
                
                /// <summary>
                /// 字段名：Classes_CreateUserID - 数据类型：String
                /// </summary>
                public static Field Classes_CreateUserID = new Field<T_Classes>("Classes_CreateUserID");
                
                /// <summary>
                /// 字段名：Classes_CreateDate - 数据类型：String
                /// </summary>
                public static Field Classes_CreateDate = new Field<T_Classes>("Classes_CreateDate");
                
                /// <summary>
                /// 字段名：Classes_CreateIP - 数据类型：String
                /// </summary>
                public static Field Classes_CreateIP = new Field<T_Classes>("Classes_CreateIP");
            }
        }
    }
    